package com.dmz.etc.server.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.Base64Utils;

/**
 * @author lee
 */
@Component
@Getter
public class AppConfig {
    @Value("${dmz.etc.crypto.ede.key}")
    private String key;

    @Value("${dmz.etc.crypto.ede.iv}")
    private String iv;

    @Value("${dmz.etc.crypto.ede.keyBytes}")
    private String keyBytes;

    public byte[] getIv() {
        return Base64Utils.decodeFromString(iv);
    }

    public byte[] getKeyBytes() {
        return Base64Utils.decodeFromString(keyBytes);
    }
}
